<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>示例15</title>
    <script src="jquery.js"></script>
    <script>
        function show(){
            //用户名 admin 密码 123456 登录成功
            //否则 显示登录失败
            const username = $("#username").val()
            const password = $("#password").val()
            if(username=="" || password==""){
                alert("请完整填写内容")
                return;
            }
            if(username=="admin" && password=="123456"){
                alert("登录成功·")
            }else{
                alert("登录失败")
            }
        }
    </script>
</head>
<body>
    <div>
        <h1>用户登录</h1>
        <p>
            用户名:<input id="username"/>
        </p>
        <p>
            密码:<input id="password"/>
        </p>
        <p>
            <button onclick="show()">登录</button>
        </p>
    </div>
</body>
</html>